package com.example.attempt.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
@Data
public class SubmitWithFile {
    private int hid;
    private String sid;
    private String time;
    // 表示返回时间类型
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")      // 表示接收时间类型
    private LocalDateTime submit_time;
    private String submit_content;
    private MultipartFile sFile;
    public int getTime(){
        DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        this.submit_time = LocalDateTime.now();
        return 0;
    }
}
